package com.piotrs10.bsk.model.permissions;

import java.io.Serializable;

public class PermissionEntry implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3901252740669791491L;
	private Integer obiektID;
	private String nazwa;
	private Integer canSelect;
	private Integer canGrantSelect;
	private Integer canInsert;
	private Integer canGrantInsert;
	private Integer canUpdate;
	private Integer canGrantUpdate;
	private Integer canDelete;
	private Integer canGrantDelete;
	private Integer canSelectGrantOption;
	private Integer canInsertGrantOption;
	private Integer canUpdateGrantOption;
	private Integer canDeleteGrantOption;
	
	

	public PermissionEntry(Integer obiektID, String nazwa, Integer canSelect,
			Integer canGrantSelect, Integer canInsert, Integer canGrantInsert,
			Integer canUpdate, Integer canGrantUpdate, Integer canDelete,
			Integer canGrantDelete, Integer canSelectGrantOption,
			Integer canInsertGrantOption, Integer canUpdateGrantOption,
			Integer canDeleteGrantOption) {
		super();
		this.obiektID = obiektID;
		this.nazwa = nazwa;
		this.canSelect = canSelect;
		this.canGrantSelect = canGrantSelect;
		this.canInsert = canInsert;
		this.canGrantInsert = canGrantInsert;
		this.canUpdate = canUpdate;
		this.canGrantUpdate = canGrantUpdate;
		this.canDelete = canDelete;
		this.canGrantDelete = canGrantDelete;
		this.canSelectGrantOption = canSelectGrantOption;
		this.canInsertGrantOption = canInsertGrantOption;
		this.canUpdateGrantOption = canUpdateGrantOption;
		this.canDeleteGrantOption = canDeleteGrantOption;
	}

	
	
	public Integer getCanSelectGrantOption() {
		return canSelectGrantOption;
	}



	public void setCanSelectGrantOption(Integer canSelectGrantOption) {
		this.canSelectGrantOption = canSelectGrantOption;
	}



	public Integer getCanInsertGrantOption() {
		return canInsertGrantOption;
	}



	public void setCanInsertGrantOption(Integer canInsertGrantOption) {
		this.canInsertGrantOption = canInsertGrantOption;
	}



	public Integer getCanUpdateGrantOption() {
		return canUpdateGrantOption;
	}



	public void setCanUpdateGrantOption(Integer canUpdateGrantOption) {
		this.canUpdateGrantOption = canUpdateGrantOption;
	}



	public Integer getCanDeleteGrantOption() {
		return canDeleteGrantOption;
	}



	public void setCanDeleteGrantOption(Integer canDeleteGrantOption) {
		this.canDeleteGrantOption = canDeleteGrantOption;
	}



	public Integer getObiektID() {
		return obiektID;
	}

	public void setObiektID(Integer obiektID) {
		this.obiektID = obiektID;
	}

	public String getNazwa() {
		return nazwa;
	}

	public void setNazwa(String nazwa) {
		this.nazwa = nazwa;
	}

	public Integer getCanSelect() {
		return canSelect;
	}

	public void setCanSelect(Integer canSelect) {
		this.canSelect = canSelect;
	}

	public Integer getCanGrantSelect() {
		return canGrantSelect;
	}

	public void setCanGrantSelect(Integer canGrantSelect) {
		this.canGrantSelect = canGrantSelect;
	}

	public Integer getCanInsert() {
		return canInsert;
	}

	public void setCanInsert(Integer canInsert) {
		this.canInsert = canInsert;
	}

	public Integer getCanGrantInsert() {
		return canGrantInsert;
	}

	public void setCanGrantInsert(Integer canGrantInsert) {
		this.canGrantInsert = canGrantInsert;
	}

	public Integer getCanUpdate() {
		return canUpdate;
	}

	public void setCanUpdate(Integer canUpdate) {
		this.canUpdate = canUpdate;
	}

	public Integer getCanGrantUpdate() {
		return canGrantUpdate;
	}

	public void setCanGrantUpdate(Integer canGrantUpdate) {
		this.canGrantUpdate = canGrantUpdate;
	}

	public Integer getCanDelete() {
		return canDelete;
	}

	public void setCanDelete(Integer canDelete) {
		this.canDelete = canDelete;
	}

	public Integer getCanGrantDelete() {
		return canGrantDelete;
	}

	public void setCanGrantDelete(Integer canGrantDelete) {
		this.canGrantDelete = canGrantDelete;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		PermissionEntry other = (PermissionEntry) obj;
		if (canDelete == null) {
			if (other.canDelete != null)
				return false;
		} else if (!canDelete.equals(other.canDelete))
			return false;
		if (canDeleteGrantOption == null) {
			if (other.canDeleteGrantOption != null)
				return false;
		} else if (!canDeleteGrantOption.equals(other.canDeleteGrantOption))
			return false;
		/*if (canGrantDelete == null) {
			if (other.canGrantDelete != null)
				return false;
		} else if (!canGrantDelete.equals(other.canGrantDelete))
			return false;
		if (canGrantInsert == null) {
			if (other.canGrantInsert != null)
				return false;
		} else if (!canGrantInsert.equals(other.canGrantInsert))
			return false;
		if (canGrantSelect == null) {
			if (other.canGrantSelect != null)
				return false;
		} else if (!canGrantSelect.equals(other.canGrantSelect))
			return false;
		if (canGrantUpdate == null) {
			if (other.canGrantUpdate != null)
				return false;
		} else if (!canGrantUpdate.equals(other.canGrantUpdate))
			return false;*/
		if (canInsert == null) {
			if (other.canInsert != null)
				return false;
		} else if (!canInsert.equals(other.canInsert))
			return false;
		if (canInsertGrantOption == null) {
			if (other.canInsertGrantOption != null)
				return false;
		} else if (!canInsertGrantOption.equals(other.canInsertGrantOption))
			return false;
		if (canSelect == null) {
			if (other.canSelect != null)
				return false;
		} else if (!canSelect.equals(other.canSelect))
			return false;
		if (canSelectGrantOption == null) {
			if (other.canSelectGrantOption != null)
				return false;
		} else if (!canSelectGrantOption.equals(other.canSelectGrantOption))
			return false;
		if (canUpdate == null) {
			if (other.canUpdate != null)
				return false;
		} else if (!canUpdate.equals(other.canUpdate))
			return false;
		if (canUpdateGrantOption == null) {
			if (other.canUpdateGrantOption != null)
				return false;
		} else if (!canUpdateGrantOption.equals(other.canUpdateGrantOption))
			return false;
		if (nazwa == null) {
			if (other.nazwa != null)
				return false;
		} else if (!nazwa.equals(other.nazwa))
			return false;
		if (obiektID == null) {
			if (other.obiektID != null)
				return false;
		} else if (!obiektID.equals(other.obiektID))
			return false;
		return true;
	}

		
	
	

}
